package weapon

import (
	"fmt"
	"math"
	"ys.calc/pointFunction"
	"ys.calc/role"
)

func InitWavebreakersFin(refineLevel float64, times float64) Weapon {
	var subStatValue = 13.8
	var mainStateValue = 620.0
	return Weapon{
		Name:     fmt.Sprintf("精%d断浪长鳍%d层", int(refineLevel), int(times)),
		Atk:      mainStateValue,
		Code:     5,
		SubState: subStatValue,
		SubStateFunc: func(r *role.Role) {
			pointFunction.PercentATK(subStatValue, r)
		},
		SpFunc: func(r *role.Role) {
			WavebreakersFinSp(refineLevel, times, r)
		},
	}
}
func WavebreakersFinSp(refineLevel float64, times float64, r *role.Role) {

	increase := math.Min(0.12*times, 40)
	r.Increase += increase * (1 + (refineLevel-1)*0.25)
}
